#!/usr/bin/env bash

# Start Mechanical Theme

current="$(cat ~/.config/openbox/visual-mode/current)"

if [[ $current != *"mechanical"* ]]; then

    # Kill Current
    bash -c '~/.config/openbox/visual-mode/kill-ui'
    
    # Set UI & Theme
    bash -c '~/.config/openbox/visual-mode/mechanical/theme'
    bash -c '~/.config/openbox/visual-mode/mechanical/ui'
    
    # Tray
    bash -c '~/.config/openbox/tray'
    
    # Write Current
    echo "mechanical" > ~/.config/openbox/visual-mode/current

    # Notify Success
    notify-send -u low -i lookswitcher "Visual Mode" "Mechanical Theme Applied"

else

    # Notify Fail
    notify-send -u low -i lookswitcher "Visual Mode" "You're Already in Mechanical Theme"
    
fi
